1. Field of the Invention
The present invention relates to a method of processing data.
2. Related Background Art
Hitherto, there is known a system for recording data output from a host system such as a personal computer, using a recording apparatus.
In such a system, an interface of a parallel or an asynchronous type is generally employed between the host computer and the recording apparatus.
According to a serial interface, there are such advantageous points that a dual directional communication is available, and in addition the number of signal wires are reduced and thus a connector is miniaturized. On the other hand, there is a defect that a transfer rate is slow. Thus, in a case where image data is transmitted from a host system to a recording apparatus having a high resolution and a large capacity of data, the transfer rate is slower than the recording speed of the recording apparatus.
In order to reduce the amount of data, there are employed in the communication line various effective data compression schemes in units of bits. Those conventional schemes, however, have a drawback that while the compression rate is high, it takes much time for the compression and expansion using a software.
It is possible to provide the expansion function with hardware at the recording apparatus end so as to increase the speed. However, there is no host system having hardware for such specific use. Thus, this scheme is not desired since it is a high in cost. Thus, it is required to provide a compression scheme capable of performing processing on a software basis. In view of those points, hitherto, in a case where data transfer is performed in a raster direction, compression is performed in units of bytes in the horizontal direction, so that the amount of data is reduced. This is advantageous in compression only when the same data continues over plural bytes in the horizontal direction, or when a repetitive pattern of block(s) is present. The reason why the compression is limited to one in units of bytes is that the processing rate of the software slows down significantly if it is one in units of bits, or a repetitive management of the same number of bits.